package com.demo.init;

import com.demo.service.SysDeptService;
import com.demo.service.SysDictService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

/**
 * 项目启动加载字典数据到Redis缓存
 * @author gxd
 * @since 2025/5/28
 */
@Slf4j
@Component
public class SystemInitRunner implements CommandLineRunner {

    @Autowired
    private SysDeptService deptService;

    @Autowired
    private SysDictService dictService;

    @Override
    public void run(String... args) throws Exception {
        log.info("----------准备加载[部门]到Redis----------");
        // deptService.loadingDeptCache();
        // log.info("----------准备加载[字典]到Redis----------");
        // dictService.loadingDictCache();
    }
}
